<div class="container main">
  <div class="box flat">
    <div class="header">
      <div class="actions">
        <a href="#" class="minimize"><i class="fa fa-sort-down"></i></a>
      </div>
      <h3>编辑资料</h3>
    </div>
    <div class="content">
      <div class="row">
        <%= form_for @article, url: update_profile_backend_article_path, remote: true do |f| %>
            <div class="col-sm-6">
              <div class="form-group">
                <%= f.label :title %>
                <%= f.text_field :title, class: 'form-control' %>
              </div>

              <div class="form-group">
                <% if f.object.published_at.blank? %>
                    <div class="checkbox">
                      <%= f.label :published_at, ('发布' + check_box_tag(:publish)).html_safe, for: nil %>
                    </div>
                <% else %>
                    <%= f.label :published_at %>
                    <%= f.text_field :published_at, class: 'form-control', value: f.object.published_at.strftime('%Y-%m-%d %H:%M') %>
                <% end %>
              </div>
            </div>

            <div class="col-sm-6">
              <div class="form-group">
                <%= f.label :slug %>
                <%= f.text_field :slug, class: 'form-control' %>
              </div>

              <br/>
              <div class="clearfix">
                <%= f.submit '提 交', class: 'btn btn-primary pull-right' %>
              </div>
            </div>
        <% end %>
      </div>
    </div>
  </div>
</div>